package com.stud.postgres.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.stud.postgres.jdbc.GeometryTypeHandler;
import com.stud.postgres.jdbc.HstoreTypeHandler;
import com.stud.postgres.jdbc.ListLongTypeHandler;
import com.stud.postgres.jdbc.ListStringTypeHandler;
import lombok.Data;

import java.util.List;

/**
 * @author Stud
 * @date 2023-11-30 13:57
 */
@TableName(value = "test", autoResultMap = true)
@Data
public class TestEntity {

    @TableField(value = "longs", typeHandler = ListLongTypeHandler.class)
    private List<Long> longs;

    @TableField(value = "strings", typeHandler = ListStringTypeHandler.class)
    private List<String> strings;

    @TableField(value = "strings", typeHandler = GeometryTypeHandler.class)
    private String geometry;

    @TableField(value = "strings", typeHandler = HstoreTypeHandler.class)
    private String hstore;

}
